package java01;

public class Game369 {

	public static void main(String[] args) {
		int jcount=0;
		for(int i=1;i<29;i++){
			if(i%10!=0 & (i%10)%3==0)
				System.out.print("¦ ");
			else
				System.out.print(i+" ");
		}
		System.out.println("\n");
		
		for(int i=1;i<100;i++){
			if((i/10)%3==0 & i>10)
				jcount++;
			if(i%10!=0 & (i%10)%3==0)
				jcount++;
			if(jcount>0){
				for(int j=0;j<jcount;j++)
					System.out.print("¦");
			}
			else
				System.out.print(i);
			System.out.print(" ");
			jcount=0;
			if(i%30==0)
				System.out.println();
		}
	}
}
